﻿<UserControl x:Class="BasketballRoster.View.RosterControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="300">
    
    <UserControl.Resources>
        <DataTemplate x:Key="PlayerItemTemplate">
            <TextBlock>
                <Run Text="{Binding Name}"/>
                <Run Text=" #"/>
                <Run Text="{Binding Number}"/>
            </TextBlock>
        </DataTemplate>
    </UserControl.Resources>
    
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <Border BorderThickness="3" BorderBrush="Blue" Background="Black">
            <StackPanel Margin="20">
                <TextBlock Text="{Binding TeamName}" FontSize="20" FontWeight="Bold" FontFamily="Segoe" Foreground="White" />
                <TextBlock Text="Starting Players" FontSize="16" FontFamily="Segoe" Foreground="White" Margin="0,5,0,0"/>
                <ListView ItemTemplate="{StaticResource PlayerItemTemplate}" ItemsSource="{Binding Starters}" Background="Black" Foreground="White" Margin="0,5,0,0"/>
                <TextBlock Text="Bench Players" FontSize="16" FontFamily="Segoe" Foreground="White" Margin="0,5,0,0"/>
                <ListView ItemTemplate="{StaticResource PlayerItemTemplate}" ItemsSource="{Binding Bench}" Background="Black" Foreground="White" Margin="0,5,0,0"/>
            </StackPanel>
        </Border>
        
            
    </Grid>
</UserControl>
